package com.cares.event.entity;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import cn.sh.cares.dao.entity.BaseEntity;

/**
 * 流程表
 * @author xuji
 */
@Entity
@Table(name="T_EVENT_PROCESS")
public class TEventProcess extends BaseEntity implements Serializable {
	
	private static final long serialVersionUID = -252446878628740502L;

	@Id
	@Column(name = "EVENT_FLOW_ID")
	private Long eventFlowId;
	
	//流程类型
	@Column(name = "EVENT_CLASS", nullable=false)
	private Long eventClass;

	//流程名称
	@Column(name = "EVENT_NAME")
	private String eventName;
	
	//流程版本号
	@Column(name = "EVENT_VARSION", precision = 10, scale = 0)
	private Long eventVarsion;
	
	//流程创建日期
	@Column(name = "EVENT_TIME")
	private Date eventTime;
	
	//流程模板状态
	@Column(name = "STATE")
	private String state;

	//存储流程xml文件关联表id
	@Column(name = "LOB_ID")
	private Long lobId;
	
	//是否立即启动
	@Column(name = "START_NOW")
	private String startNow;
	
	//启动时间
	@Column(name = "START_TIME")
	private Date startTime;
	
	//是否循环执行
	@Column(name = "LOOP_RUN")
	private String loopRun;
   
	//循环间隔时间
	@Column(name = "LOOP_SPACE_TIME")
	private Long loopSpaceTime;
	
	//@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "jsflowId")
	//private List<JsflowDeploypropVO> JsflowDeploypropVOs = new ArrayList<JsflowDeploypropVO>();
	
	@OneToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "eventFlowId")
	private TEventLob tEventLob;


	@Override
	public Serializable getId() {
		return this.eventFlowId;
	}

	public Long getEventFlowId() {
		return eventFlowId;
	}


	public void setEventFlowId(Long eventFlowId) {
		this.eventFlowId = eventFlowId;
	}


	public Long getEventClass() {
		return eventClass;
	}


	public void setEventClass(Long eventClass) {
		this.eventClass = eventClass;
	}


	public String getEventName() {
		return eventName;
	}


	public void setEventName(String eventName) {
		this.eventName = eventName;
	}


	public Long getEventVarsion() {
		return eventVarsion;
	}


	public void setEventVarsion(Long eventVarsion) {
		this.eventVarsion = eventVarsion;
	}


	public Date getEventTime() {
		return eventTime;
	}


	public void setEventTime(Date eventTime) {
		this.eventTime = eventTime;
	}


	public String getState() {
		return state;
	}


	public void setState(String state) {
		this.state = state;
	}


	public Long getLobId() {
		return lobId;
	}


	public void setLobId(Long lobId) {
		this.lobId = lobId;
	}


	public String getStartNow() {
		return startNow;
	}


	public void setStartNow(String startNow) {
		this.startNow = startNow;
	}


	public Date getStartTime() {
		return startTime;
	}


	public void setStartTime(Date startTime) {
		this.startTime = startTime;
	}


	public String getLoopRun() {
		return loopRun;
	}


	public void setLoopRun(String loopRun) {
		this.loopRun = loopRun;
	}


	public Long getLoopSpaceTime() {
		return loopSpaceTime;
	}


	public void setLoopSpaceTime(Long loopSpaceTime) {
		this.loopSpaceTime = loopSpaceTime;
	}


	public TEventLob getTEventLob() {
		return tEventLob;
	}


	public void setTEventLob(TEventLob eventLob) {
		tEventLob = eventLob;
	}

}
